<script src=<?php echo base_url('public/plug_in/tiny_mce/tiny_mce.js');?>></script>

<script type="text/javascript">
//導覽列指定-blog
$(function(){
	$("#menu ul > li[class='blog']").attr("class","current_page_item");
});

//使用tinymce文字編輯器
tinyMCE.init({
	mode: "textareas",
	theme: "advanced",
	width: "1000",
	height: "500"
});
</script>

<style>
#func{
  float:right;
}
#logo {
  padding: 30px 0px 10px;
}
#page {
  padding: 0px 0px;
}
h3,label{
  display:inline;  
}

</style>

<div id="header-wrapper">
	<div id="header">
		<div id="logo">		
		<h1><a href="#">我的 <span>blog</span></a>
		    <a href="<?php echo site_url('frontend/blog')?>"><b><span style="font-size:18px;float:right">返回列表</span></b></a>
		</h1>	
		</div>
    <hr/>		
	</div>	
</div>
<p>

<div id="wrapper">
	<!-- end #header -->
	<div id="page">
	 <h3>新增文章內容 :</h3>
	 <p></p>
		<div id="page-bgtop">
		 
			<div id="page-bgbtm">		
			 
			 <?php echo form_open('frontend/blog/add')?>
			 
			   <!-- OF COURSE YOU NEED TO ADAPT ACTION TO WHAT PAGE YOU WANT TO LOAD WHEN HITTING "SAVE" -->
                <form method="post" action="<?php echo site_url("frontend/blog/add");?>">
                       
                     <label><h3 style="color: black;font-size:16px;">文章分類：</h3></label>
                           <input type="text" name="category_id"/><?php echo form_error('category_id');?>                           
                    <div style="float: right">
                      <label><h3 style="color: black;font-size:16px;">建立日期：</h3></label>
                           <input type="text" name="cdate" value="<?php echo date('Y/m/d h:i:s');?>"/>
                    </div>
                     <p>
                      <label><h3 style="color: black;font-size:16px;">標題：</h3></label>
                           <input style="width:600px" type="text" name="title"/><?php echo form_error('title');?>
                     </p>                    
                    <textarea name="content" cols="50" rows="15">This is some content that will be editable with TinyMCE.</textarea>
                    <?php echo form_error('content');?>
                    <input class='btn btn-primary' id="login_btn" type="submit" value="儲存" />
                    <input type="hidden" name="cuser" value="<?php echo $login ?>" />
                </form>
			 
			
			</div>
		</div>
	</div>
	<!-- end #page -->
</div>

